COPE
We are interested in how people respond when they confront difficult or stressful events in their lives. There are lots of ways to try to deal with stress. This questionnaire asks you to indicate what you generally do and feel, when you experience stressful events. Obviously, different events bring out somewhat different responses, but think about what you usually do when you are under a lot of stress.
Then respond to each of the following items by blackening one number on your answer sheet for each, using the response choices listed just below. Please try to respond to each item separately in your mind from each other item. Choose your answers thoughtfully, and make your answers as true FOR YOU as you can. Please answer every item. There are no “right” or “wrong” answers, so choose the most accurate answer for YOU–not what you think “most people” would say or do. Indicate what YOU usually do when YOU experience a stressful event.
1 = I usually don't do this at all
2 = I usually do this a little bit
3 = I usually do this a medium amount
4 = I usually do this a lot
I try to grow as a person as a result of the experience.
I turn to work or other substitute activities to take my mind off things.
I get upset and let my emotions out.
I try to get advice from someone about what to do.
I concentrate my efforts on doing something about it.
I say to myself “this isn’t real.”
I put my trust in God.
I laugh about the situation.
I admit to myself that I can’t deal with it, and quit trying.
I restrain myself from doing anything too quickly.
I discuss my feelings with someone.
I use alcohol or drugs to make myself feel better.
I get used to the idea that it happened.
I talk to someone to find out more about the situation.
I keep myself from getting distracted by other thoughts or activities.
I daydream about things other than this.
I get upset, and am really aware of it.
I seek God’s help.
I make a plan of action.
I make jokes about it.
I accept that this has happened and that it can’t be changed.
I hold off doing anything about it until the situation permits.
I try to get emotional support from friends or relatives.
I just give up trying to reach my goal.
I take additional action to try to get rid of the problem.
I try to lose myself for a while by drinking alcohol or taking drugs.
I refuse to believe that it has happened.
I let my feelings out.
I try to see it in a different light, to make it seem more positive.
I talk to someone who could do something concrete about the problem.
I sleep more than usual.
I try to come up with a strategy about what to do.
I focus on dealing with this problem, and if necessary let other things slide a little.
I get sympathy and understanding from someone.
I drink alcohol or take drugs, in order to think about it less.
I kid around about it.
I give up the attempt to get what I want.
I look for something good in what is happening.
I think about how I might best handle the problem.
I pretend that it hasn’t really happened.
I make sure not to make matters worse by acting too soon.
I try hard to prevent other things from interfering with my efforts at dealing with this.
I go to movies or watch TV, to think about it less.
I accept the reality of the fact that it happened.
I ask people who have had similar experiences what they did.
I feel a lot of emotional distress and I find myself expressing those feelings a lot.
I take direct action to get around the problem.
I try to find comfort in my religion.
I force myself to wait for the right time to do something.
I make fun of the situation.
I reduce the amount of effort I’m putting into solving the problem.
I talk to someone about how I feel.
I use alcohol or drugs to help me get through it.
I learn to live with it.
I put aside other activities in order to concentrate on this.
I think hard about what steps to take.
I act as though it hasn’t even happened.
I do what has to be done, one step at a time.
I learn something from the experience.
I pray more than usual.
Scales (sum items listed, with no reversals of coding):
Positive reinterpretation and growth: 1, 29, 38, 59 Mental disengagement: 2, 16, 31, 43 Focus on and venting of emotions: 3, 17, 28, 46 Use of instrumental social support: 4, 14, 30, 45 Active coping: 5, 25, 47, 58 Denial: 6, 27, 40, 57 Religious coping: 7, 18, 48, 60 Humor: 8, 20, 36, 50 Behavioral disengagement: 9, 24, 37, 51 Restraint: 10, 22, 41, 49 Use of emotional social support: 11, 23, 34, 52 Substance use: 12, 26, 35, 53 Acceptance: 13, 21, 44, 54 Suppression of competing activities: 15, 33, 42, 55 Planning: 19, 32, 39, 56
library("here")
library("tidyverse")
library("MplusAutomation")
library("gt")
library("glue")
library("kableExtra")
library("misty")
library("lavaan")
library("AICcmodavg")
library("nonnest2")
library("DiagrammeR")
library("lavaan")
library("tidyLPA")
library("semTools")
library("brms")
library("MBESS")
library("ufs")
library("robmed")
library("careless")
library("psych")
options("max.print" = .Machine$integer.max)
# Make random things reproducible
set.seed(1234)
options(
mc.cores = 6 # Use 6 cores
)
source(here::here("src", "R", "functions", "funs_add_neoffi60_subscales.R"))
source(here::here("src", "R", "functions", "funs_correct_iesr_scores.R"))
source(here::here("src", "R", "functions", "funs_plot_job_qualification.R"))
source(here::here("src", "R", "functions", "funs_generate_all_items_df.R"))
scale_this <- function(x) as.vector(scale(x))
all_items <- generate_all_items_df()
There is a problem with IES-R, in the control group. I shift the control distribution of IES-R towards lower values.
all_items$ies_ts <- NULL
temp <- correct_iesr_scores(all_items)
all_items <- temp
Compute IES-R total score.
all_items$iesr_ts <- with(
all_items,
ies_1 + ies_2 + ies_3 + ies_4 + ies_5 + ies_6 + ies_7 + ies_8 + ies_9 +
ies_10 + ies_11 + ies_12 + ies_13 + ies_14 + ies_15 + ies_16 + ies_17 +
ies_18 + ies_19 + ies_20 + ies_21 + ies_22
)
ggplot(all_items, aes(x = iesr_ts, colour = is_rescue_worker)) +
geom_density()
all_items |>
group_by(is_rescue_worker) |>
summarize(
avg_iesr = mean(iesr_ts)
)
Supported families are: ‘acat’, ‘asym_laplace’, ‘bernoulli’, ‘beta’, ‘beta_binomial’, ‘binomial’, ‘categorical’, ‘com_poisson’, ‘cox’, ‘cratio’, ‘cumulative’, ‘custom’, ‘dirichlet’, ‘dirichlet2’, ‘discrete_weibull’, ‘exgaussian’, ‘exponential’, ‘frechet’, ‘gamma’, ‘gaussian’, ‘gen_extreme_value’, ‘geometric’, ‘hurdle_cumulative’, ‘hurdle_gamma’, ‘hurdle_lognormal’, ‘hurdle_negbinomial’, ‘hurdle_poisson’, ‘info’, ‘inverse.gaussian’, ‘logistic_normal’, ‘lognormal’, ‘multinomial’, ‘negbinomial’, ‘negbinomial2’, ‘poisson’, ‘shifted_lognormal’, ‘skew_normal’, ‘sratio’, ‘student’, ‘von_mises’, ‘weibull’, ‘wiener’, ‘zero_inflated_asym_laplace’, ‘zero_inflated_beta’, ‘zero_inflated_beta_binomial’, ‘zero_inflated_binomial’, ‘zero_inflated_negbinomial’, ‘zero_inflated_poisson’, ‘zero_one_inflated_beta’
The sk, ch, mi sub-scales are coded so that high values indicate high self-compassion levels. The sj, is, oi sub-scales are coded so that high values indicate low self-compassion levels.
The ts_sc score has been computed by reversing the coding of the items of the sj, is, oi sub-scales (so that they indicate the absence of self-judgment, absence of isolation, absence of over-identification).
scs_subscales <- with(all_items, data.frame(sk, ch, mi, sj, is, oi, ts_sc))
cor(scs_subscales) |> round(2)
sk ch mi sj is oi ts_sc
sk 1.00 0.52 0.58 -0.39 -0.28 -0.24 0.30
ch 0.52 1.00 0.49 -0.01 -0.03 -0.04 0.54
mi 0.58 0.49 1.00 -0.19 -0.33 -0.35 0.28
sj -0.39 -0.01 -0.19 1.00 0.67 0.66 0.63
is -0.28 -0.03 -0.33 0.67 1.00 0.80 0.67
oi -0.24 -0.04 -0.35 0.66 0.80 1.00 0.67
ts_sc 0.30 0.54 0.28 0.63 0.67 0.67 1.00
In the COPE scale only two factors are identified.
all_items$pos_reinterpretation <- with(all_items, cope_1 + cope_29 + cope_38 + cope_59)
all_items$mental_disengagement <- with(all_items, cope_2 + cope_16 + cope_31 + cope_43)
all_items$venting <- with(all_items, cope_3 + cope_17 + cope_28 + cope_46)
all_items$seeking_instrumental_support <- with(all_items, cope_4 + cope_14 + cope_30 + cope_45)
all_items$active_coping <- with(all_items, cope_5 + cope_25 + cope_47 + cope_58)
all_items$denial <- with(all_items, cope_6 + cope_27 + cope_40 + cope_57)
all_items$religion <- with(all_items, cope_7 + cope_18 + cope_48 + cope_60)
all_items$humor <- with(all_items, cope_8 + cope_20 + cope_36 + cope_50)
all_items$behavioral_disengagement <- with(all_items, cope_9 + cope_24 + cope_37 + cope_51)
all_items$restraint <- with(all_items, cope_10 + cope_22 + cope_41 + cope_49)
all_items$seeking_emotional_support <- with(all_items, cope_11 + cope_23 + cope_34 + cope_52)
all_items$substance_use <- with(all_items, cope_12 + cope_26 + cope_35 + cope_53)
all_items$acceptance <- with(all_items, cope_13 + cope_21 + cope_44 + cope_54)
all_items$suppr_competing_activities <- with(all_items, cope_15 + cope_33 + cope_42 + cope_55)
all_items$planning <- with(all_items, cope_19 + cope_32 + cope_39 + cope_56)
Create COPE sub-scales scores using all items – note that SEM analyses suggest to drop some of the items.
all_items$active_coping <- with(
all_items, pos_reinterpretation + active_coping +
suppr_competing_activities + planning + restraint +
seeking_instrumental_support + acceptance
)
all_items$avoidance_coping <- with(
all_items, mental_disengagement + denial + humor +
behavioral_disengagement + substance_use + religion
)
all_items$soc_emo_coping <- with(
all_items, seeking_instrumental_support +
seeking_emotional_support + venting
)
library("brms")
plot(density(all_items$ts_sc))
fit_1 <- brm(
ts_sc ~ is_rescue_worker,
family = student(),
backend = "cmdstanr",
data = all_items
)
pp_check(fit_1)
Using 10 posterior draws for ppc type 'dens_overlay' by default.
me <- conditional_effects(
fit_1, "is_rescue_worker"
)
plot(me, points = FALSE)
summary(fit_1)
Family: student
Links: mu = identity; sigma = identity; nu = identity
Formula: ts_sc ~ is_rescue_worker
Data: all_items (Number of observations: 1068)
Draws: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
total post-warmup draws = 4000
Population-Level Effects:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept 74.07 0.45 73.19 74.93 1.00 3556 2618
is_rescue_workerno 6.94 0.80 5.41 8.53 1.00 3709 2912
Family Specific Parameters:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
sigma 11.31 0.42 10.49 12.11 1.00 2512 2685
nu 12.50 5.27 6.55 25.64 1.00 2434 1949
Draws were sampled using sample(hmc). For each parameter, Bulk_ESS
and Tail_ESS are effective sample size measures, and Rhat is the potential
scale reduction factor on split chains (at convergence, Rhat = 1).
lpa_scales <- c(
# "is_rescue_worker",
"neuroticism", "extraversion", "openness", "agreeableness", "conscientiousness",
"active_coping", "avoidance_coping", "soc_emo_coping",
"iesr_ts",
# "sk", "ch", "mi", "sj", "is", "oi",
# "pos_sc",
# "neg_sc",
# "ts_sc",
"mpss_tot",
"ptgi_total_score"
# "relating_to_others",
# "new_possibilities",
# "personal_strength",
# "appreciation_of_life",
# "spirituality"
)
lpa_df <- subset(all_items, select=lpa_scales)
Only RW
rw_df <- all_items |>
dplyr::filter(is_rescue_worker == "yes")
lpa_rw_df <- subset(rw_df, select=lpa_scales)
I tried with only the RW data. The LPA produces a 2 classes solution. However, the classes are less interpretable than those found when the data of all two groups are used. So, it is better to use all the data for the LPA.
lpa_df %>%
scale() %>%
estimate_profiles(1:10,
variances = c("equal", "varying"),
covariances = c("zero", "varying"),
# package = "MplusAutomation"
) %>%
compare_solutions(statistics = c("AIC", "BIC"))
Compare tidyLPA solutions:
Model Classes AIC BIC
1 1 33372.375 33481.793
1 2 32161.998 32331.098
1 3 31651.493 31880.276
1 4 31286.624 31575.089
1 5 31144.365 31492.513
1 6 31036.339 31444.170
1 7 30886.942 31354.455
1 8 30852.444 31379.640
1 9 30730.207 31317.085
1 10 30601.776 31248.336
6 1 31156.833 31539.796
6 2 30335.968 31106.867
6 3 29932.341 31091.177
6 4 29858.141 31404.913
6 5 29793.858 31728.566
6 6 29820.278 32142.922
6 7 29695.429 32406.010
6 8 29747.123 32845.640
6 9 29727.921 33214.374
6 10 29757.813 33632.203
Best model according to AIC is Model 6 with 7 classes.
Best model according to BIC is Model 6 with 3 classes.
An analytic hierarchy process, based on the fit indices AIC, AWE, BIC, CLC, and KIC (Akogul & Erisoglu, 2017), suggests the best solution is Model 6 with 3 classes.
Compare tidyLPA solutions:
Model Classes AIC BIC
1 1 86371.720 86481.034 1 2 85170.836 85339.776 1 3 84750.979 84979.546
1 4 84266.489 84554.683 1 5 84119.416 84467.235 1 6 84012.505 84419.951
1 7 83871.894 84338.966 1 8 83848.135 84374.833 1 9 83774.673 84360.997
1 10 83627.711 84273.661 6 1 84148.600 84531.202 6 2 83350.747 84120.919
6 3 82934.273 84092.015 6 4 82866.542 84411.855 6 5 82811.110 84743.992
6 6 82751.355 85071.809 6 7 82683.505 85391.528 6 8 82709.839 85805.433
6 9 82802.128 86285.292 6 10 82813.820 86684.554
Best model according to AIC is Model 6 with 7 classes. Best model according to BIC is Model 6 with 3 classes.
An analytic hierarchy process, based on the fit indices AIC, AWE, BIC, CLC, and KIC (Akogul & Erisoglu, 2017), suggests the best solution is Model 6 with 3 classes.
Varying variances and varying covariances (Model 6)
m2 <- lpa_df %>%
# scale() %>%
estimate_profiles(3,
variances = "varying",
covariances = "varying"
# package = "MplusAutomation"
)
temp <- lpa_df
temp$lpa_class <- NULL
m2_plot <- temp %>%
scale() %>%
estimate_profiles(2,
variances = "varying",
covariances = "varying",
package = "MplusAutomation"
) %>%
plot_profiles()
Profile 1: adaptive Profile 2: dysfunctional Profile 3: adaptive under duress (high IES scores, low MSPSS scores)
get_estimates(m2)
out <- get_data(m2)
lpa_df$lpa_class <- out$Class
table(
lpa_df$lpa_class, all_items$is_rescue_worker
)
yes no
1 249 47
2 42 181
3 455 94
1 - (455 + 249) / (455 + 249 + 42)
[1] 0.05630027
# [1] 0.9436997
181 / (181 + 47 + 94)
[1] 0.5621118
table(
lpa_df$lpa_class, all_items$job_qualification
)
driver team_leader team_member non_rescue_worker
1 42 105 105 44
2 3 17 18 185
3 110 177 169 93
all_items$class <- factor(lpa_df$lpa_class)
m1 <- brm(
ts_sc ~ class,
data = all_items,
backend = "cmdstanr",
)
pp_check(m1)
Using 10 posterior draws for ppc type 'dens_overlay' by default.
summary(m1)
Family: gaussian
Links: mu = identity; sigma = identity
Formula: ts_sc ~ class
Data: all_items (Number of observations: 1068)
Draws: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
total post-warmup draws = 4000
Population-Level Effects:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept 80.25 0.68 78.88 81.59 1.00 3852 3014
class2 2.27 1.04 0.19 4.31 1.00 3990 3201
class3 -9.32 0.84 -10.94 -7.65 1.00 3962 3274
Family Specific Parameters:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
sigma 11.81 0.25 11.34 12.33 1.00 3853 2863
Draws were sampled using sample(hmc). For each parameter, Bulk_ESS
and Tail_ESS are effective sample size measures, and Rhat is the potential
scale reduction factor on split chains (at convergence, Rhat = 1).
me <- conditional_effects(
m1, "class"
)
plot(me, points = FALSE)
names(all_items)
[1] "ies_1" "ies_2" "ies_3"
[4] "ies_4" "ies_5" "ies_6"
[7] "ies_7" "ies_8" "ies_9"
[10] "ies_10" "ies_11" "ies_12"
[13] "ies_13" "ies_14" "ies_15"
[16] "ies_16" "ies_17" "ies_18"
[19] "ies_19" "ies_20" "ies_21"
[22] "ies_22" "id" "group"
[25] "avoiding" "intrusivity" "hyperarousal"
[28] "ies_ts" "neoffi_1" "neoffi_2"
[31] "neoffi_3" "neoffi_4" "neoffi_5"
[34] "neoffi_6" "neoffi_7" "neoffi_8"
[37] "neoffi_9" "neoffi_10" "neoffi_11"
[40] "neoffi_12" "neoffi_13" "neoffi_14"
[43] "neoffi_15" "neoffi_16" "neoffi_17"
[46] "neoffi_18" "neoffi_19" "neoffi_20"
[49] "neoffi_21" "neoffi_22" "neoffi_23"
[52] "neoffi_24" "neoffi_25" "neoffi_26"
[55] "neoffi_27" "neoffi_28" "neoffi_29"
[58] "neoffi_30" "neoffi_31" "neoffi_32"
[61] "neoffi_33" "neoffi_34" "neoffi_35"
[64] "neoffi_36" "neoffi_37" "neoffi_38"
[67] "neoffi_39" "neoffi_40" "neoffi_41"
[70] "neoffi_42" "neoffi_43" "neoffi_44"
[73] "neoffi_45" "neoffi_46" "neoffi_47"
[76] "neoffi_48" "neoffi_49" "neoffi_50"
[79] "neoffi_51" "neoffi_52" "neoffi_53"
[82] "neoffi_54" "neoffi_55" "neoffi_56"
[85] "neoffi_57" "neoffi_58" "neoffi_59"
[88] "neoffi_60" "cope_1" "cope_2"
[91] "cope_3" "cope_4" "cope_5"
[94] "cope_6" "cope_7" "cope_8"
[97] "cope_9" "cope_10" "cope_11"
[100] "cope_12" "cope_13" "cope_14"
[103] "cope_15" "cope_16" "cope_17"
[106] "cope_18" "cope_19" "cope_20"
[109] "cope_21" "cope_22" "cope_23"
[112] "cope_24" "cope_25" "cope_26"
[115] "cope_27" "cope_28" "cope_29"
[118] "cope_30" "cope_31" "cope_32"
[121] "cope_33" "cope_34" "cope_35"
[124] "cope_36" "cope_37" "cope_38"
[127] "cope_39" "cope_40" "cope_41"
[130] "cope_42" "cope_43" "cope_44"
[133] "cope_45" "cope_46" "cope_47"
[136] "cope_48" "cope_49" "cope_50"
[139] "cope_51" "cope_52" "cope_53"
[142] "cope_54" "cope_55" "cope_56"
[145] "cope_57" "cope_58" "cope_59"
[148] "cope_60" "ptgi_1" "ptgi_2"
[151] "ptgi_3" "ptgi_4" "ptgi_5"
[154] "ptgi_6" "ptgi_7" "ptgi_8"
[157] "ptgi_9" "ptgi_10" "ptgi_11"
[160] "ptgi_12" "ptgi_13" "ptgi_14"
[163] "ptgi_15" "ptgi_16" "ptgi_17"
[166] "ptgi_18" "ptgi_19" "ptgi_20"
[169] "ptgi_21" "scs_1" "scs_2"
[172] "scs_3" "scs_4" "scs_5"
[175] "scs_6" "scs_7" "scs_8"
[178] "scs_9" "scs_10" "scs_11"
[181] "scs_12" "scs_13" "scs_14"
[184] "scs_15" "scs_16" "scs_17"
[187] "scs_18" "scs_19" "scs_20"
[190] "scs_21" "scs_22" "scs_23"
[193] "scs_24" "scs_25" "scs_26"
[196] "mspss_1" "mspss_2" "mspss_3"
[199] "mspss_4" "mspss_5" "mspss_6"
[202] "mspss_7" "mspss_8" "mspss_9"
[205] "mspss_10" "mspss_11" "mspss_12"
[208] "date" "gender" "age"
[211] "education" "employment" "is_rescue_worker"
[214] "red_cross_commeetee_location" "rescue_worker_qualification" "last_training"
[217] "rate_of_activity" "job_qualification" "is_job_qualification_invariant"
[220] "is_team_invariant" "is_married" "FLAG_1"
[223] "neuroticism" "extraversion" "openness"
[226] "agreeableness" "conscientiousness" "social_support"
[229] "avoiding_strategies" "positive_attitude" "problem_orientation"
[232] "transcendent_orientation" "cope_total_score" "relating_to_others"
[235] "new_possibilities" "personal_strength" "appreciation_of_life"
[238] "spirituality" "ptgi_total_score" "self_kindness"
[241] "self_judgment" "common_humanity" "isolation"
[244] "mindfulness" "over_identification" "neg_self_compassion"
[247] "pos_self_compassion" "family" "friends"
[250] "significant_other" "mpss_tot" "FLAG_2"
[253] "negative_affect" "self_reproach" "positive_affect"
[256] "sociability" "activity" "aesthetic_interests"
[259] "intellectual_interests" "unconventionality" "nonantagonistic_orientation"
[262] "prosocial_orientation" "orderliness" "goal_striving"
[265] "dependability" "rate_of_activity_num" "last_training_num"
[268] "education_num" "pos_sc" "neg_sc"
[271] "ts_sc" "sk" "ch"
[274] "mi" "sj" "is"
[277] "oi" "iesr_ts" "pos_reinterpretation"
[280] "mental_disengagement" "venting" "seeking_instrumental_support"
[283] "active_coping" "denial" "religion"
[286] "humor" "behavioral_disengagement" "restraint"
[289] "seeking_emotional_support" "substance_use" "acceptance"
[292] "suppr_competing_activities" "planning" "avoidance_coping"
[295] "soc_emo_coping" "class"
m2 <- brm(
sj ~ job_qualification * class,
data = all_items,
backend = "cmdstanr",
)
pp_check(m2)
Using 10 posterior draws for ppc type 'dens_overlay' by default.
summary(m2)
Family: gaussian
Links: mu = identity; sigma = identity
Formula: sj ~ job_qualification * class
Data: all_items (Number of observations: 1068)
Draws: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
total post-warmup draws = 4000
Population-Level Effects:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
Intercept 16.09 0.70 14.72 17.49 1.00 1489
job_qualificationteam_leader 1.24 0.84 -0.47 2.88 1.00 1660
job_qualificationteam_member 1.25 0.83 -0.35 2.87 1.00 1586
job_qualificationnon_rescue_worker 0.64 1.00 -1.33 2.64 1.00 1774
class2 -2.30 2.74 -7.53 3.02 1.00 1550
class3 -3.15 0.83 -4.83 -1.55 1.00 1490
job_qualificationteam_leader:class2 1.14 3.01 -4.62 6.92 1.00 1677
job_qualificationteam_member:class2 4.03 2.98 -1.88 9.84 1.00 1643
job_qualificationnon_rescue_worker:class2 2.05 2.85 -3.52 7.44 1.00 1569
job_qualificationteam_leader:class3 -0.09 1.00 -1.98 1.85 1.00 1658
job_qualificationteam_member:class3 -0.35 1.00 -2.29 1.58 1.00 1583
job_qualificationnon_rescue_worker:class3 1.94 1.19 -0.52 4.27 1.00 1691
Tail_ESS
Intercept 1881
job_qualificationteam_leader 2092
job_qualificationteam_member 2121
job_qualificationnon_rescue_worker 2245
class2 2027
class3 2186
job_qualificationteam_leader:class2 2128
job_qualificationteam_member:class2 1902
job_qualificationnon_rescue_worker:class2 2035
job_qualificationteam_leader:class3 2472
job_qualificationteam_member:class3 2443
job_qualificationnon_rescue_worker:class3 2389
Family Specific Parameters:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
sigma 4.52 0.10 4.33 4.71 1.00 2971 2656
Draws were sampled using sample(hmc). For each parameter, Bulk_ESS
and Tail_ESS are effective sample size measures, and Rhat is the potential
scale reduction factor on split chains (at convergence, Rhat = 1).
me <- conditional_effects(
m2, "job_qualification:class"
)
plot(me, points = FALSE)
m3 <- brm(
is ~ job_qualification * class,
data = all_items,
backend = "cmdstanr",
)
pp_check(m3)
Using 10 posterior draws for ppc type 'dens_overlay' by default.
me <- conditional_effects(
m3, "job_qualification:class"
)
plot(me, points = FALSE)
m4 <- brm(
oi ~ job_qualification*class,
data = all_items,
backend = "cmdstanr",
)
pp_check(m4)
Using 10 posterior draws for ppc type 'dens_overlay' by default.
me <- conditional_effects(
m4, "job_qualification:class"
)
plot(me, points = FALSE)
m5 <- brm(
sk ~ job_qualification*class,
data = all_items,
backend = "cmdstanr",
)
pp_check(m5)
Using 10 posterior draws for ppc type 'dens_overlay' by default.
me <- conditional_effects(
m5, "job_qualification:class"
)
plot(me, points = FALSE)
m6 <- brm(
ch ~ job_qualification*class,
data = all_items,
backend = "cmdstanr",
)
pp_check(m6)
Using 10 posterior draws for ppc type 'dens_overlay' by default.
me <- conditional_effects(
m6, "job_qualification:class"
)
plot(me, points = FALSE)
m7 <- brm(
mi ~ job_qualification*class,
data = all_items,
backend = "cmdstanr",
)
pp_check(m7)
Using 10 posterior draws for ppc type 'dens_overlay' by default.
me <- conditional_effects(
m7, "job_qualification:class"
)
plot(me, points = FALSE)
Profilo 2: disfunzionale Profilo 1: adattivo Profilo 3: adattivo con stress
m8 <- brm(
sj ~ class,
data = all_items,
backend = "cmdstanr",
)
pp_check(m8)
Using 10 posterior draws for ppc type 'dens_overlay' by default.
me <- conditional_effects(
m8, "class"
)
plot(me, points = FALSE)
m9 <- brm(
is ~ class,
data = all_items,
backend = "cmdstanr",
)
pp_check(m9)
Using 10 posterior draws for ppc type 'dens_overlay' by default.
me <- conditional_effects(
m9, "class"
)
plot(me, points = FALSE)
m10 <- brm(
oi ~ class,
data = all_items,
backend = "cmdstanr",
)
pp_check(m10)
Using 10 posterior draws for ppc type 'dens_overlay' by default.
me <- conditional_effects(
m10, "class"
)
plot(me, points = FALSE)
m11 <- brm(
sk ~ class,
data = all_items,
backend = "cmdstanr",
)
pp_check(m11)
Using 10 posterior draws for ppc type 'dens_overlay' by default.
me <- conditional_effects(
m11, "class"
)
plot(me, points = FALSE)
rw_df <- all_items |>
dplyr::filter(is_rescue_worker == "yes")
rw_df$job_qualification <- factor(
rw_df$job_qualification,
order = TRUE,
levels = c("driver", "team_leader", "team_member")
)
fit_sc1 <- brm(
formula = job_qualification ~ 1 + class, data = rw_df,
family = cumulative("probit")
)
Warning: Rows containing NAs were excluded from the model.Compiling Stan program...
Start sampling
starting worker pid=61591 on localhost:11543 at 16:59:32.866
starting worker pid=61605 on localhost:11543 at 16:59:33.035
starting worker pid=61619 on localhost:11543 at 16:59:33.193
starting worker pid=61633 on localhost:11543 at 16:59:33.348
SAMPLING FOR MODEL 'c7b1a3fcb4cf4364ae59a68a5be2c6cb' NOW (CHAIN 1).
Chain 1:
Chain 1: Gradient evaluation took 0.0002 seconds
Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 2 seconds.
Chain 1: Adjust your expectations accordingly!
Chain 1:
Chain 1:
Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup)
SAMPLING FOR MODEL 'c7b1a3fcb4cf4364ae59a68a5be2c6cb' NOW (CHAIN 2).
Chain 2:
Chain 2: Gradient evaluation took 0.000187 seconds
Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 1.87 seconds.
Chain 2: Adjust your expectations accordingly!
Chain 2:
Chain 2:
Chain 2: Iteration: 1 / 2000 [ 0%] (Warmup)
SAMPLING FOR MODEL 'c7b1a3fcb4cf4364ae59a68a5be2c6cb' NOW (CHAIN 3).
Chain 3:
Chain 3: Gradient evaluation took 0.000169 seconds
Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 1.69 seconds.
Chain 3: Adjust your expectations accordingly!
Chain 3:
Chain 3:
Chain 3: Iteration: 1 / 2000 [ 0%] (Warmup)
Chain 1: Iteration: 200 / 2000 [ 10%] (Warmup)
SAMPLING FOR MODEL 'c7b1a3fcb4cf4364ae59a68a5be2c6cb' NOW (CHAIN 4).
Chain 4:
Chain 4: Gradient evaluation took 0.000183 seconds
Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 1.83 seconds.
Chain 4: Adjust your expectations accordingly!
Chain 4:
Chain 4:
Chain 4: Iteration: 1 / 2000 [ 0%] (Warmup)
Chain 2: Iteration: 200 / 2000 [ 10%] (Warmup)
Chain 1: Iteration: 400 / 2000 [ 20%] (Warmup)
Chain 3: Iteration: 200 / 2000 [ 10%] (Warmup)
Chain 2: Iteration: 400 / 2000 [ 20%] (Warmup)
Chain 4: Iteration: 200 / 2000 [ 10%] (Warmup)
Chain 1: Iteration: 600 / 2000 [ 30%] (Warmup)
Chain 3: Iteration: 400 / 2000 [ 20%] (Warmup)
Chain 2: Iteration: 600 / 2000 [ 30%] (Warmup)
Chain 4: Iteration: 400 / 2000 [ 20%] (Warmup)
Chain 1: Iteration: 800 / 2000 [ 40%] (Warmup)
Chain 3: Iteration: 600 / 2000 [ 30%] (Warmup)
Chain 2: Iteration: 800 / 2000 [ 40%] (Warmup)
Chain 1: Iteration: 1000 / 2000 [ 50%] (Warmup)
Chain 1: Iteration: 1001 / 2000 [ 50%] (Sampling)
Chain 4: Iteration: 600 / 2000 [ 30%] (Warmup)
Chain 3: Iteration: 800 / 2000 [ 40%] (Warmup)
Chain 2: Iteration: 1000 / 2000 [ 50%] (Warmup)
Chain 2: Iteration: 1001 / 2000 [ 50%] (Sampling)
Chain 4: Iteration: 800 / 2000 [ 40%] (Warmup)
Chain 1: Iteration: 1200 / 2000 [ 60%] (Sampling)
Chain 3: Iteration: 1000 / 2000 [ 50%] (Warmup)
Chain 3: Iteration: 1001 / 2000 [ 50%] (Sampling)
Chain 2: Iteration: 1200 / 2000 [ 60%] (Sampling)
Chain 4: Iteration: 1000 / 2000 [ 50%] (Warmup)
Chain 4: Iteration: 1001 / 2000 [ 50%] (Sampling)
Chain 1: Iteration: 1400 / 2000 [ 70%] (Sampling)
Chain 3: Iteration: 1200 / 2000 [ 60%] (Sampling)
Chain 2: Iteration: 1400 / 2000 [ 70%] (Sampling)
Chain 4: Iteration: 1200 / 2000 [ 60%] (Sampling)
Chain 1: Iteration: 1600 / 2000 [ 80%] (Sampling)
Chain 3: Iteration: 1400 / 2000 [ 70%] (Sampling)
Chain 2: Iteration: 1600 / 2000 [ 80%] (Sampling)
Chain 4: Iteration: 1400 / 2000 [ 70%] (Sampling)
Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling)
Chain 3: Iteration: 1600 / 2000 [ 80%] (Sampling)
Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling)
Chain 4: Iteration: 1600 / 2000 [ 80%] (Sampling)
Chain 3: Iteration: 1800 / 2000 [ 90%] (Sampling)
Chain 1: Iteration: 2000 / 2000 [100%] (Sampling)
Chain 1:
Chain 1: Elapsed Time: 0.940123 seconds (Warm-up)
Chain 1: 0.837873 seconds (Sampling)
Chain 1: 1.778 seconds (Total)
Chain 1:
Chain 2: Iteration: 2000 / 2000 [100%] (Sampling)
Chain 2:
Chain 2: Elapsed Time: 0.932211 seconds (Warm-up)
Chain 2: 0.866921 seconds (Sampling)
Chain 2: 1.79913 seconds (Total)
Chain 2:
Chain 4: Iteration: 1800 / 2000 [ 90%] (Sampling)
Chain 3: Iteration: 2000 / 2000 [100%] (Sampling)
Chain 3:
Chain 3: Elapsed Time: 0.923712 seconds (Warm-up)
Chain 3: 0.796903 seconds (Sampling)
Chain 3: 1.72062 seconds (Total)
Chain 3:
Chain 4: Iteration: 2000 / 2000 [100%] (Sampling)
Chain 4:
Chain 4: Elapsed Time: 0.956639 seconds (Warm-up)
Chain 4: 0.808723 seconds (Sampling)
Chain 4: 1.76536 seconds (Total)
Chain 4:
marginal_effects(fit_sc1, "class", categorical = TRUE)
Warning: Method 'marginal_effects' is deprecated. Please use 'conditional_effects' instead.
summary(fit_sc1)
Family: cumulative
Links: mu = probit; disc = identity
Formula: job_qualification ~ 1 + class
Data: rw_df (Number of observations: 741)
Draws: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
total post-warmup draws = 4000
Population-Level Effects:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept[1] -0.93 0.08 -1.08 -0.78 1.00 2887 2519
Intercept[2] 0.17 0.07 0.03 0.32 1.00 3867 3380
class2 0.18 0.20 -0.21 0.58 1.00 3350 2858
class3 -0.19 0.09 -0.36 -0.02 1.00 3517 3061
Family Specific Parameters:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
disc 1.00 0.00 1.00 1.00 NA NA NA
Draws were sampled using sampling(NUTS). For each parameter, Bulk_ESS
and Tail_ESS are effective sample size measures, and Rhat is the potential
scale reduction factor on split chains (at convergence, Rhat = 1).
all_items_clean <- all_items[!temp1$FLAG, ]
all_items_clean$class
[1] 0 1 0 0 0 1 0 1 0 0 1 1 1 1 1 0 1 1 1 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 0 1 0 1 1 0 0 0 1 0 0 1 0 1 1 0 1 1
[62] 1 1 1 1 0 0 0 1 1 1 1 0 1 0 1 1 1 1 1 1 0 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 1 1 1 1 1 1 0 1 1 0 1 0
[123] 1 1 0 1 1 0 1 1 0 1 1 0 0 1 1 1 1 1 1 1 0 1 0 0 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1 1 1 0 0 1 1 0 1 1 1 0 0 1
[184] 1 0 1 0 0 0 1 0 1 1 0 1 1 1 1 1 0 0 1 0 0 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 0 1 0 1 1 1 1 0 1 0 0 1 0 0 1 1 1 1 1 1 1 1 0 1 1
[245] 1 1 1 1 1 0 0 1 1 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 0
[306] 1 1 0 0 1 0 1 1 0 1 0 1 1 0 0 0 1 0 1 0 1 1 0 1 0 1 1 0 1 0 1 0 0 0 1 0 1 1 1 0 1 1 0 1 1 1 0 1 1 0 1 0 1 0 1 1 1 0 1 1 1
[367] 1 1 0 1 0 1 0 1 1 1 1 1 0 0 0 1 1 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1
[428] 0 0 0 1 1 1 1 0 1 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 0 0 1 1 1 0 0 1 1 0 1 1 1 0 0 1 1 1 1 1 1 0
[489] 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 1 1 0 1 1
[550] 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 1 0 0 0 1 1 0 1 1 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 0 0 1
[611] 1 1 0 1 0 0 1 1 1 1 1 0 0 0 1 0 1 1 1 0 1 0 1 1 1 1 0 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 0
[672] 1 1 1 1 1 0 0 1 1 1 1 0 1 1 0 1 1 1 0 1 1 0 0 1 1 0 1 0 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1
[733] 1 1 0 0 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 0 0 1 0 1 0 1 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 1 1 0 0 1 0 0 1 0 0 0 0
[794] 0 1 1 1 0 0 0 0 1 0 0 1 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0
[855] 1 0 0 1 0 1 0 1 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 1 0 0 1 0 0 1 0 1 0 0 0 1 0 0 1 0 1 0 1 0 1 1 0 0
[916] 0 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 1 0 1 1 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1
[977] 0 1 1 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 1 0 0 0 0 0 0 1 1 1 1 1 0 0 1 0 1 0 0 0 0 0 1
[1038] 1 0 0 0 0 0 0 1 0 1 0 0 1 1 1 1 0 1 1 0 1 0 0
m1 <- brm(
class ~ is_rescue_worker,
family = bernoulli(),
backend = "cmdstanr",
all_items_clean
)
pp_check(m1)
Using 10 posterior draws for ppc type 'dens_overlay' by default.
summary(m1)
Family: bernoulli
Links: mu = logit
Formula: class ~ is_rescue_worker
Data: all_items_clean (Number of observations: 1060)
Draws: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
total post-warmup draws = 4000
Population-Level Effects:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept 0.72 0.08 0.56 0.88 1.00 2948 2459
is_rescue_workerno -1.49 0.15 -1.79 -1.21 1.00 2718 2153
Draws were sampled using sample(hmc). For each parameter, Bulk_ESS
and Tail_ESS are effective sample size measures, and Rhat is the potential
scale reduction factor on split chains (at convergence, Rhat = 1).
conditional_effects(
m1, "is_rescue_worker"
)
model_glm = glm(class ~ is_rescue_worker, data = all_items_clean, family = "binomial")
model_glm_pred = ifelse(predict(model_glm, type = "link") > 0, "Yes", "No")
all_items_clean$class_lpa <- ifelse(all_items_clean$class == 1, "Yes", "No")
train_tab = table(predicted = model_glm_pred, actual = all_items_clean$class_lpa)
library(caret)
train_con_mat = confusionMatrix(train_tab, positive = "Yes")
c(train_con_mat$overall["Accuracy"],
train_con_mat$byClass["Sensitivity"],
train_con_mat$byClass["Specificity"])
Accuracy Sensitivity Specificity
0.6754717 0.8333333 0.4695652
library(pROC)
test_prob = predict(model_glm, newdata = all_items_clean, type = "response")
all_items_clean$rw <- ifelse(
all_items_clean$is_rescue_worker == "yes", 1, 0
)
test_roc = roc(all_items_clean$class_lpa ~ all_items_clean$rw, plot = TRUE, print.auc = TRUE)
Setting levels: control = No, case = Yes
Setting direction: controls < cases
as.numeric(test_roc$auc)
[1] 0.6514493
summary(model_glm)
Call:
glm(formula = class ~ is_rescue_worker, family = "binomial",
data = all_items_clean)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.4932 -0.8723 0.8915 0.8915 1.5170
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.71744 0.07809 9.187 <2e-16 ***
is_rescue_workerno -1.48755 0.14397 -10.332 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 1450.9 on 1059 degrees of freedom
Residual deviance: 1336.0 on 1058 degrees of freedom
AIC: 1340
Number of Fisher Scoring iterations: 4
all_items$last_training <- ifelse(
is.na(all_items$last_training), 0, all_items$last_training
)
all_items$rate_of_activity <- ifelse(
is.na(all_items$rate_of_activity), 0, all_items$rate_of_activity
)
all_items$is_job_qualification_invariant <- ifelse(
all_items$is_job_qualification_invariant == "Sì" | all_items$is_job_qualification_invariant == "Si",
"Yes", all_items$is_job_qualification_invariant
)
all_items$is_job_qualification_invariant <- ifelse(
is.na(all_items$is_job_qualification_invariant), "Cntr", all_items$is_job_qualification_invariant
)
all_items$is_team_invariant <- ifelse(
all_items$is_team_invariant == "Sì" | all_items$is_team_invariant == "Si",
"Yes", all_items$is_team_invariant
)
all_items$is_team_invariant <- ifelse(
is.na(all_items$is_team_invariant), "Cntr", all_items$is_team_invariant
)
rw_df <- all_items |>
dplyr::filter(is_rescue_worker == "yes" & job_qualification != "non_rescue_worker")
fm1 <- brm(
class ~ job_qualification,
# (gender + age + education + employment + job_qualification),
# last_training + rate_of_activity + is_job_qualification_invariant + is_team_invariant),
family = bernoulli(),
backend = "cmdstanr",
rw_df
)
pp_check(fm1)
Using 10 posterior draws for ppc type 'dens_overlay' by default.
summary(fm1)
Family: bernoulli
Links: mu = logit
Formula: class ~ job_qualification
Data: rw_df (Number of observations: 741)
Draws: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
total post-warmup draws = 4000
Population-Level Effects:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept 1.55 0.21 1.16 1.98 1.00 1869 2049
job_qualificationteam_leader -0.72 0.24 -1.20 -0.24 1.00 2054 2406
job_qualificationteam_member -0.90 0.24 -1.39 -0.44 1.00 2121 2265
Draws were sampled using sample(hmc). For each parameter, Bulk_ESS
and Tail_ESS are effective sample size measures, and Rhat is the potential
scale reduction factor on split chains (at convergence, Rhat = 1).
conditional_effects(
fm1, "job_qualification"
)
fm2 <- brm(
class ~ gender + age + education,
family = bernoulli(),
backend = "cmdstanr",
rw_df
)
summary(fm2)
Family: bernoulli
Links: mu = logit
Formula: class ~ gender + age + education
Data: rw_df (Number of observations: 741)
Draws: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
total post-warmup draws = 4000
Population-Level Effects:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept -0.37 0.27 -0.90 0.18 1.00 6772 3014
gender1 -0.20 0.08 -0.36 -0.03 1.00 6537 3326
age 0.03 0.01 0.02 0.04 1.00 6878 3506
educationDottorato 0.37 0.72 -0.88 1.93 1.00 6791 2559
educationLaureabreve 0.01 0.24 -0.46 0.49 1.00 5725 3185
educationLaureamagistrale 0.50 0.23 0.07 0.94 1.00 5968 3109
educationScuolamediaprimaria 0.19 0.36 -0.48 0.95 1.00 6815 2645
Draws were sampled using sample(hmc). For each parameter, Bulk_ESS
and Tail_ESS are effective sample size measures, and Rhat is the potential
scale reduction factor on split chains (at convergence, Rhat = 1).
EOF ——————-
suppressMessages(mod_1c_v1 <- estimate_profiles(df = lpa_df, n_profiles = 1:9,
models = 1))
mod_1c_v1
only_rw <- all_items |>
dplyr::filter(is_rescue_worker == "yes")
rw_df <- data.frame(
# exogeneous vars
neu = only_rw$neuroticism,
extra = only_rw$extraversion,
open = only_rw$openness,
agree = only_rw$agreeableness,
consc = only_rw$conscientiousness,
mpss = only_rw$mpss_tot,
# mediators
actcop = only_rw$active_coping,
avocop = only_rw$avoidance_coping,
scpos = only_rw$pos_self_compassion,
scneg = only_rw$neg_self_compassion,
# endogeneous vars
iesr = only_rw$iesr_ts,
ptgi = only_rw$ptgi_total_score
)
mod1 <- iesr ~ serial_m(actcop, scneg) + mpss + covariates(neu, consc)
out1 <- test_mediation(mod1, data = rw_df, robust= FALSE)
summary(out1)
Bootstrap tests for indirect effects via regression
Serial multiple mediator model
x = mpss
y = iesr
m1 = actcop
m2 = scneg
Covariates:
[1] neu consc
Sample size: 746
---
Outcome variable: actcop
Coefficients:
Data Boot Std. Error z value Pr(>|z|)
(Intercept) 33.09508 33.13128 1.94302 17.051 < 2e-16 ***
mpss 0.06599 0.06546 0.01974 3.317 0.000910 ***
neu -0.10798 -0.10860 0.02893 -3.754 0.000174 ***
consc 0.33859 0.33870 0.03790 8.937 < 2e-16 ***
Residual standard error: 6.109 on 742 degrees of freedom
Multiple R-squared: 0.1983, Adjusted R-squared: 0.1951
F-statistic: 61.19 on 3 and 742 DF, p-value: < 2.2e-16
---
Outcome variable: scneg
Coefficients:
Data Boot Std. Error z value Pr(>|z|)
(Intercept) 65.98252 65.96909 3.36814 19.586 <2e-16 ***
actcop -0.22981 -0.23060 0.05194 -4.440 9e-06 ***
mpss 0.06306 0.06327 0.02750 2.301 0.0214 *
neu -0.90687 -0.90724 0.03892 -23.309 <2e-16 ***
consc 0.03896 0.04041 0.05829 0.693 0.4882
Residual standard error: 8.474 on 741 degrees of freedom
Multiple R-squared: 0.4726, Adjusted R-squared: 0.4698
F-statistic: 166 on 4 and 741 DF, p-value: < 2.2e-16
---
Outcome variable: iesr
Coefficients:
Data Boot Std. Error z value Pr(>|z|)
(Intercept) 16.39604 16.43346 6.56136 2.505 0.01226 *
actcop 0.06099 0.06125 0.08823 0.694 0.48754
scneg -0.45999 -0.45999 0.06182 -7.441 1.00e-13 ***
mpss 0.04885 0.04776 0.04232 1.129 0.25901
neu 0.35611 0.35623 0.08465 4.208 2.57e-05 ***
consc 0.25855 0.25891 0.09551 2.711 0.00671 **
Residual standard error: 13.58 on 740 degrees of freedom
Multiple R-squared: 0.228, Adjusted R-squared: 0.2228
F-statistic: 43.71 on 5 and 740 DF, p-value: < 2.2e-16
---
Total effect of x on y:
Data Boot Std. Error z value Pr(>|z|)
mpss 0.03085 0.02965 0.04369 0.679 0.497
Direct effect of x on y:
Data Boot Std. Error z value Pr(>|z|)
mpss 0.04885 0.04776 0.04232 1.129 0.259
Indirect effects of x on y:
Data Boot Lower Upper
Total -0.018005 -0.018113 -0.048665 0.011358
Indirect1 0.004025 0.004089 -0.006955 0.018397
Indirect2 -0.029005 -0.029200 -0.057280 -0.003639
Indirect3 0.006976 0.006998 0.002613 0.014885
Indirect effect paths:
---
Level of confidence: 95 %
Number of bootstrap replicates: 5000
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
mod_med <- '
ptgi_total_score ~ neuroticism
ptgi_total_score ~ extraversion
ptgi_total_score ~ openness
ptgi_total_score ~ agreeableness
ptgi_total_score ~ conscientiousness
ptgi_total_score ~ mpss_tot
iesr_ts ~ neuroticism
iesr_ts ~ extraversion
iesr_ts ~ openness
iesr_ts ~ agreeableness
iesr_ts ~ conscientiousness
iesr_ts ~ mpss_tot
active_coping ~ neuroticism
active_coping ~ extraversion
active_coping ~ openness
active_coping ~ agreeableness
active_coping ~ conscientiousness
active_coping ~ mpss_tot
avoidance_coping ~ neuroticism
avoidance_coping ~ extraversion
avoidance_coping ~ openness
avoidance_coping ~ agreeableness
avoidance_coping ~ conscientiousness
avoidance_coping ~ mpss_tot
ts_sc ~ neuroticism
ts_sc ~ extraversion
ts_sc ~ openness
ts_sc ~ agreeableness
ts_sc ~ conscientiousness
ts_sc ~ mpss_tot
ptgi_total_score ~ ts_sc
ptgi_total_score ~ active_coping
ptgi_total_score ~ avoidance_coping
iesr_ts ~ ts_sc
iesr_ts ~ active_coping
iesr_ts ~ avoidance_coping
'
mod_med <- '
pos_self_compassion ~ c(pscn1, pscn2)*neuroticism + c(psce1, psce2)*extraversion + c(psco1, psco2)*openness +
c(psca1, psca2)*agreeableness + c(pscc1, pscc2)*conscientiousness + c(pscm1, pscm2)*mpss_tot +
c(psct1, psct2)*active_coping + c(pscv1, pscv2)*avoidance_coping
neg_self_compassion ~ c(nscn1, nscn2)*neuroticism + c(nsce1, nce2)*extraversion + c(nsco1, nsco2)*openness +
c(nsca1, nsca2)*agreeableness + c(nscc1, nscc2)*conscientiousness + c(nscm1, nscm2)*mpss_tot +
c(nscat1, nsct2)*active_coping + c(nscv1, nscv2)*avoidance_coping
ptgi_total_score ~ c(gn1, gn2)*neuroticism + c(ge1, ge2)*extraversion + c(go1, go2)*openness +
c(ga1, ga2)*agreeableness + c(gc1, gc2)*conscientiousness + c(gm1, gm2)*mpss_tot +
c(gat1, gat2)*active_coping + c(gv1, gv2)*avoidance_coping
iesr_ts ~ c(in1, in2)*neuroticism + c(ie1, ie2)*extraversion + c(io1, io2)*openness +
c(ia1, ia2)*agreeableness + c(ic1, ic2)*conscientiousness + c(im1, im2)*mpss_tot +
c(iat1, iat2)*active_coping + c(iv1, iv2)*avoidance_coping
ptgi_total_score ~ c(gpsc1, gpsc2)*pos_self_compassion + c(gnsc1, gnsc2)*neg_self_compassion
iesr_ts ~ c(ipsc1, ipsc2)*pos_self_compassion + c(insc1, insc2)*neg_self_compassion
pos_self_compassion ~~ neg_self_compassion
# indirect effect ()
abgg1 := pscn1*gpsc1 + psce1*gpsc1 + psco1*gpsc1 + psca1*gpsc1 + pscc1*gpsc1 + pscm1*gpsc1 + psct1*gpsc1 + pscv1*gpsc1
abgg2 := pscn2*gpsc2 + psce2*gpsc2 + psco2*gpsc2 + psca2*gpsc2 + pscc2*gpsc2 + pscm2*gpsc2 + psct2*gpsc2 + pscv2*gpsc2
abig1 := pscn1*ipsc1 + psce1*ipsc1 + psco1*ipsc1 + psca1*ipsc1 + pscc1*ipsc1 + pscm1*ipsc1 + psct1*ipsc1 + pscv1*ipsc1
abig2 := pscn2*ipsc2 + psce2*ipsc2 + psco2*ipsc2 + psca2*ipsc2 + pscc2*ipsc2 + pscm2*ipsc2 + psct2*ipsc2 + pscv2*ipsc2
# total effect
totalgg1 := abgg1 + gn1 + ge1 + go1 + ga1 + gc1 + gm1 + gat1 + gv1
totalgg2 := abgg2 + gn2 + ge2 + go2 + ga2 + gc2 + gm2 + gat2 + gv2
totalig1 := abig1 + in1 + ie1 + io1 + ia1 + ic1 + im1 + iat1 + iv1
totalig2 := abig2 + in2 + ie2 + io2 + ia2 + ic2 + im2 + iat2 + iv2
'
mod_med <- '
ptgi_total_score ~ c(gn1, gn2)*neuroticism + c(ge1, ge2)*extraversion + c(go1, go2)*openness +
c(ga1, ga2)*agreeableness + c(gc1, gc2)*conscientiousness + c(gm1, gm2)*mpss_tot
iesr_ts ~ c(in1, in2)*neuroticism + c(ie1, ie2)*extraversion + c(io1, io2)*openness +
c(ia1, ia2)*agreeableness + c(ic1, ic2)*conscientiousness + c(im1, im2)*mpss_tot
pos_self_compassion ~ c(pscn1, pscn2)*neuroticism + c(psce1, psce2)*extraversion + c(psco1, psco2)*openness +
c(psca1, psca2)*agreeableness + c(pscc1, pscc2)*conscientiousness + c(pscm1, pscm2)*mpss_tot
neg_self_compassion ~ c(nscn1, nscn2)*neuroticism + c(nsce1, nsce2)*extraversion + c(nsco1, nsco2)*openness +
c(nsca1, nsca2)*agreeableness + c(nscc1, nscc2)*conscientiousness + c(nscm1, nscm2)*mpss_tot
active_coping ~ c(acn1, acn2)*neuroticism + c(ace1, ace2)*extraversion + c(aco1, aco2)*openness +
c(aca1, aca2)*agreeableness + c(acc1, acc2)*conscientiousness + c(acm1, acm2)*mpss_tot
avoidance_coping ~ c(vcn1, vcn2)*neuroticism + c(vce1, vce2)*extraversion + c(vco1, vco2)*openness +
c(vca1, vca2)*agreeableness + c(vcc1, vcc2)*conscientiousness + c(vcm1, vcm2)*mpss_tot
ptgi_total_score ~ c(gpsc1, gpsc2)*pos_self_compassion + c(gnsc1, gnsc2)*neg_self_compassion +
c(gac1, gac2)*active_coping + c(gav1, gav2)*avoidance_coping
iesr_ts ~ c(ipsc1, ipsc2)*pos_self_compassion + c(insc1, insc2)*neg_self_compassion +
c(iac1, iac2)*active_coping + c(iav1, iav2)*avoidance_coping
pos_self_compassion ~~ neg_self_compassion
# indirect effect
abgg1 := pscn1*gpsc1 + psce1*gpsc1 + psco1*gpsc1 + psca1*gpsc1 + pscc1*gpsc1 +
pscm1*gpsc1 +
nscn1*gpsc1 + nsce1*gpsc1 + nsco1*gpsc1 + nsca1*gpsc1 + nscc1*gpsc1 +
nscm1*gpsc1 +
acn1*gpsc1 + ace1*gpsc1 + aco1*gpsc1 + aca1*gpsc1 + acc1*gpsc1 +
acm1*gpsc1 +
vcn1*gpsc1 + vce1*gpsc1 + vco1*gpsc1 + vca1*gpsc1 + vcc1*gpsc1 +
vcm1*gpsc1
abgg2 := pscn2*gpsc2 + psce2*gpsc2 + psco2*gpsc2 + psca2*gpsc2 + pscc2*gpsc2 +
pscm2*gpsc2 +
nscn2*gpsc2 + nsce2*gpsc2 + nsco2*gpsc2 + nsca2*gpsc2 + nscc2*gpsc2 +
nscm2*gpsc2 +
acn2*gpsc2 + ace2*gpsc2 + aco2*gpsc2 + aca2*gpsc2 + acc2*gpsc2 +
acm2*gpsc2 +
vcn2*gpsc2 + vce2*gpsc2 + vco2*gpsc2 + vca2*gpsc2 + vcc2*gpsc2 +
vcm2*gpsc2
abig1 := pscn1*ipsc1 + psce1*ipsc1 + psco1*ipsc1 + psca1*ipsc1 + pscc1*ipsc1 +
pscm1*ipsc1 +
nscn1*ipsc1 + nsce1*ipsc1 + nsco1*ipsc1 + nsca1*ipsc1 + nscc1*ipsc1 +
nscm1*ipsc1 +
acn1*ipsc1 + ace1*ipsc1 + aco1*ipsc1 + aca1*ipsc1 + acc1*ipsc1 +
acm1*ipsc1 +
vcn1*ipsc1 + vce1*ipsc1 + vco1*ipsc1 + vca1*ipsc1 + vcc1*ipsc1 +
vcm1*ipsc1
abig2 := pscn2*ipsc2 + psce2*ipsc2 + psco2*ipsc2 + psca2*ipsc2 + pscc2*ipsc2 +
pscm2*ipsc2 +
nscn2*ipsc2 + nsce2*ipsc2 + nsco2*ipsc2 + nsca2*ipsc2 + nscc2*ipsc2 +
nscm2*ipsc2 +
acn2*ipsc2 + ace2*ipsc2 + aco2*ipsc2 + aca2*ipsc2 + acc2*ipsc2 +
acm2*ipsc2 +
vcn2*ipsc2 + vce2*ipsc2 + vco2*ipsc2 + vca2*ipsc2 + vcc2*ipsc2 +
vcm2*ipsc2
# total effect
totalgg1 := abgg1 + gn1 + ge1 + go1 + ga1 + gc1 + gm1 + gac1 + gav1
totalgg2 := abgg2 + gn2 + ge2 + go2 + ga2 + gc2 + gm2 + gac2 + gav2
totalig1 := abig1 + in1 + ie1 + io1 + ia1 + ic1 + im1 + iac1 + iav1
totalig2 := abig2 + in2 + ie2 + io2 + ia2 + ic2 + im2 + iac2 + iav2
'
all_items$neg_self_compassion <- -1 * all_items$neg_self_compassion
fit2 <- sem(mod_med, data = all_items, group = "is_rescue_worker",
se = "bootstrap",
bootstrap = 5000,
parallel ="snow", ncpus = 8)
standardizedSolution_boot_ci(fit2)
modificationindices(fit2, sort = TRUE)
summary(fit2, fit.measures=TRUE, standardized = TRUE)
lavaan 0.6.15 ended normally after 303 iterations
Estimator ML
Optimization method NLMINB
Number of model parameters 116
Number of observations per group:
yes 746
no 322
Model Test User Model:
Test statistic 237.485
Degrees of freedom 10
P-value (Chi-square) 0.000
Test statistic for each group:
yes 167.335
no 70.149
Model Test Baseline Model:
Test statistic 1891.499
Degrees of freedom 102
P-value 0.000
User Model versus Baseline Model:
Comparative Fit Index (CFI) 0.873
Tucker-Lewis Index (TLI) -0.297
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -23593.726
Loglikelihood unrestricted model (H1) -23474.983
Akaike (AIC) 47419.451
Bayesian (BIC) 47996.382
Sample-size adjusted Bayesian (SABIC) 47627.945
Root Mean Square Error of Approximation:
RMSEA 0.206
90 Percent confidence interval - lower 0.184
90 Percent confidence interval - upper 0.230
P-value H_0: RMSEA <= 0.050 0.000
P-value H_0: RMSEA >= 0.080 1.000
Standardized Root Mean Square Residual:
SRMR 0.041
Parameter Estimates:
Standard errors Standard
Information Expected
Information saturated (h1) model Structured
Group 1 [yes]:
Regressions:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
ptgi_total_score ~
nrtcsm (gn1) 0.427 0.141 3.034 0.002 0.427 0.160
extrvr (ge1) 0.687 0.155 4.444 0.000 0.687 0.200
opnnss (go1) -0.095 0.134 -0.706 0.480 -0.095 -0.026
agrbln (ga1) -0.108 0.154 -0.700 0.484 -0.108 -0.026
cnscnt (gc1) 0.403 0.152 2.647 0.008 0.403 0.111
mpss_t (gm1) 0.206 0.068 3.008 0.003 0.206 0.112
iesr_ts ~
nrtcsm (in1) 0.424 0.085 4.985 0.000 0.424 0.245
extrvr (ie1) 0.345 0.093 3.696 0.000 0.345 0.154
opnnss (io1) 0.038 0.081 0.472 0.637 0.038 0.016
agrbln (ia1) -0.112 0.093 -1.209 0.227 -0.112 -0.042
cnscnt (ic1) 0.209 0.092 2.273 0.023 0.209 0.089
mpss_t (im1) 0.018 0.041 0.435 0.664 0.018 0.015
pos_self_compassion ~
nrtcsm (pscn1) -0.268 0.041 -6.614 0.000 -0.268 -0.267
extrvr (psce1) 0.058 0.057 1.015 0.310 0.058 0.045
opnnss (psco1) 0.103 0.049 2.087 0.037 0.103 0.074
agrbln (psca1) 0.062 0.057 1.079 0.280 0.062 0.040
cnscnt (pscc1) 0.015 0.054 0.287 0.774 0.015 0.011
mpss_t (pscm1) 0.078 0.025 3.099 0.002 0.078 0.113
neg_self_compassion ~
nrtcsm (nscn1) 0.835 0.041 20.206 0.000 0.835 0.637
extrvr (nsce1) -0.166 0.058 -2.844 0.004 -0.166 -0.098
opnnss (nsco1) 0.189 0.050 3.775 0.000 0.189 0.105
agrbln (nsca1) -0.142 0.058 -2.436 0.015 -0.142 -0.071
cnscnt (nscc1) 0.101 0.055 1.849 0.064 0.101 0.057
mpss_t (nscm1) -0.025 0.026 -0.953 0.341 -0.025 -0.027
active_coping ~
nrtcsm (acn1) -0.085 0.030 -2.893 0.004 -0.085 -0.111
extrvr (ace1) 0.058 0.042 1.405 0.160 0.058 0.059
opnnss (aco1) 0.133 0.036 3.715 0.000 0.133 0.126
agrbln (aca1) -0.021 0.042 -0.515 0.606 -0.021 -0.018
cnscnt (acc1) 0.324 0.039 8.292 0.000 0.324 0.311
mpss_t (acm1) 0.056 0.018 3.054 0.002 0.056 0.106
avoidance_coping ~
nrtcsm (vcn1) 0.211 0.028 7.509 0.000 0.211 0.300
extrvr (vce1) 0.118 0.040 2.971 0.003 0.118 0.129
opnnss (vco1) -0.030 0.034 -0.886 0.376 -0.030 -0.031
agrbln (vca1) -0.115 0.040 -2.910 0.004 -0.115 -0.107
cnscnt (vcc1) -0.180 0.037 -4.843 0.000 -0.180 -0.188
mpss_t (vcm1) -0.007 0.018 -0.412 0.680 -0.007 -0.015
ptgi_total_score ~
ps_sl_ (gps1) 0.419 0.098 4.279 0.000 0.419 0.158
ng_sl_ (gns1) 0.171 0.096 1.783 0.075 0.171 0.084
actv_c (gac1) 0.283 0.134 2.109 0.035 0.283 0.082
avdnc_ (gav1) 0.258 0.141 1.830 0.067 0.258 0.068
iesr_ts ~
ps_sl_ (ips1) 0.082 0.059 1.396 0.163 0.082 0.048
ng_sl_ (ins1) 0.468 0.058 8.079 0.000 0.468 0.355
actv_c (iac1) -0.026 0.081 -0.315 0.753 -0.026 -0.011
avdnc_ (iav1) 0.132 0.085 1.546 0.122 0.132 0.053
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.pos_self_compassion ~~
.neg_slf_cmpssn -0.591 2.549 -0.232 0.817 -0.591 -0.008
.ptgi_total_score ~~
.iesr_ts 67.292 11.065 6.082 0.000 67.292 0.228
Intercepts:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.ptgi_total_scr -39.333 12.215 -3.220 0.001 -39.333 -1.664
.iesr_ts 7.085 7.372 0.961 0.337 7.085 0.461
.pos_slf_cmpssn 31.791 3.228 9.847 0.000 31.791 3.568
.neg_slf_cmpssn -56.610 3.292 -17.197 0.000 -56.610 -4.867
.active_coping 28.498 2.353 12.112 0.000 28.498 4.188
.avoidance_cpng 32.546 2.241 14.526 0.000 32.546 5.215
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.ptgi_total_scr 488.136 25.275 19.313 0.000 488.136 0.873
.iesr_ts 177.828 9.208 19.313 0.000 177.828 0.754
.pos_slf_cmpssn 68.267 3.535 19.313 0.000 68.267 0.860
.neg_slf_cmpssn 70.980 3.675 19.313 0.000 70.980 0.525
.active_coping 36.261 1.878 19.313 0.000 36.261 0.783
.avoidance_cpng 32.883 1.703 19.313 0.000 32.883 0.844
Group 2 [no]:
Regressions:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
ptgi_total_score ~
nrtcsm (gn2) 0.102 0.138 0.739 0.460 0.102 0.044
extrvr (ge2) 0.367 0.180 2.037 0.042 0.367 0.115
opnnss (go2) 0.138 0.169 0.818 0.413 0.138 0.045
agrbln (ga2) 0.328 0.196 1.671 0.095 0.328 0.095
cnscnt (gc2) -0.143 0.167 -0.859 0.390 -0.143 -0.049
mpss_t (gm2) 0.294 0.103 2.871 0.004 0.294 0.155
iesr_ts ~
nrtcsm (in2) 0.249 0.053 4.677 0.000 0.249 0.277
extrvr (ie2) 0.229 0.069 3.307 0.001 0.229 0.187
opnnss (io2) -0.104 0.065 -1.598 0.110 -0.104 -0.088
agrbln (ia2) -0.097 0.076 -1.284 0.199 -0.097 -0.073
cnscnt (ic2) 0.085 0.064 1.323 0.186 0.085 0.075
mpss_t (im2) -0.046 0.040 -1.163 0.245 -0.046 -0.063
pos_self_compassion ~
nrtcsm (pscn2) -0.113 0.060 -1.873 0.061 -0.113 -0.110
extrvr (psce2) 0.223 0.082 2.706 0.007 0.223 0.159
opnnss (psco2) 0.023 0.078 0.294 0.769 0.023 0.017
agrbln (psca2) -0.064 0.091 -0.701 0.483 -0.064 -0.042
cnscnt (pscc2) -0.002 0.076 -0.027 0.978 -0.002 -0.002
mpss_t (pscm2) -0.082 0.048 -1.700 0.089 -0.082 -0.097
neg_self_compassion ~
nrtcsm (nscn2) 0.349 0.069 5.049 0.000 0.349 0.285
extrvr (nsce2) -0.224 0.094 -2.379 0.017 -0.224 -0.134
opnnss (nsco2) 0.014 0.089 0.162 0.871 0.014 0.009
agrbln (nsca2) 0.009 0.104 0.088 0.930 0.009 0.005
cnscnt (nscc2) -0.086 0.087 -0.992 0.321 -0.086 -0.056
mpss_t (nscm2) 0.100 0.055 1.812 0.070 0.100 0.100
active_coping ~
nrtcsm (acn2) -0.213 0.044 -4.866 0.000 -0.213 -0.267
extrvr (ace2) 0.125 0.060 2.087 0.037 0.125 0.114
opnnss (aco2) 0.155 0.056 2.742 0.006 0.155 0.146
agrbln (aca2) -0.084 0.066 -1.275 0.202 -0.084 -0.071
cnscnt (acc2) 0.124 0.055 2.256 0.024 0.124 0.123
mpss_t (acm2) 0.049 0.035 1.415 0.157 0.049 0.075
avoidance_coping ~
nrtcsm (vcn2) 0.164 0.063 2.591 0.010 0.164 0.133
extrvr (vce2) -0.245 0.086 -2.846 0.004 -0.245 -0.146
opnnss (vco2) -0.255 0.081 -3.134 0.002 -0.255 -0.157
agrbln (vca2) -0.333 0.095 -3.506 0.000 -0.333 -0.182
cnscnt (vcc2) -0.374 0.079 -4.723 0.000 -0.374 -0.240
mpss_t (vcm2) -0.014 0.050 -0.269 0.788 -0.014 -0.013
ptgi_total_score ~
ps_sl_ (gps2) 0.149 0.130 1.150 0.250 0.149 0.066
ng_sl_ (gns2) 0.103 0.113 0.904 0.366 0.103 0.054
actv_c (gac2) 0.835 0.162 5.143 0.000 0.835 0.287
avdnc_ (gav2) 0.107 0.113 0.947 0.344 0.107 0.056
iesr_ts ~
ps_sl_ (ips2) 0.060 0.050 1.191 0.234 0.060 0.068
ng_sl_ (ins2) 0.107 0.044 2.446 0.014 0.107 0.145
actv_c (iac2) 0.101 0.063 1.615 0.106 0.101 0.090
avdnc_ (iav2) 0.043 0.043 0.984 0.325 0.043 0.058
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.pos_self_compassion ~~
.neg_slf_cmpssn -44.437 6.406 -6.937 0.000 -44.437 -0.419
.ptgi_total_score ~~
.iesr_ts 12.782 8.915 1.434 0.152 12.782 0.080
Intercepts:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.ptgi_total_scr -31.771 15.425 -2.060 0.039 -31.771 -1.432
.iesr_ts 3.846 5.944 0.647 0.518 3.846 0.449
.pos_slf_cmpssn 41.446 4.822 8.594 0.000 41.446 4.225
.neg_slf_cmpssn -42.409 5.517 -7.688 0.000 -42.409 -3.641
.active_coping 37.685 3.499 10.771 0.000 37.685 4.947
.avoidance_cpng 72.336 5.046 14.336 0.000 72.336 6.170
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.ptgi_total_scr 413.823 32.614 12.689 0.000 413.823 0.841
.iesr_ts 61.450 4.843 12.689 0.000 61.450 0.838
.pos_slf_cmpssn 92.669 7.303 12.689 0.000 92.669 0.963
.neg_slf_cmpssn 121.263 9.557 12.689 0.000 121.263 0.894
.active_coping 48.773 3.844 12.689 0.000 48.773 0.840
.avoidance_cpng 101.444 7.995 12.689 0.000 101.444 0.738
Defined Parameters:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
abgg1 0.546 0.149 3.654 0.000 0.546 0.186
abgg2 -0.113 0.106 -1.067 0.286 -0.113 -0.023
abig1 0.107 0.078 1.369 0.171 0.107 0.056
abig2 -0.045 0.041 -1.100 0.271 -0.045 -0.024
totalgg1 2.608 0.365 7.151 0.000 2.608 0.867
totalgg2 1.915 0.435 4.403 0.000 1.915 0.725
totalig1 1.135 0.216 5.264 0.000 1.135 0.575
totalig2 0.415 0.168 2.479 0.013 0.415 0.441
cor(
cbind(
all_items$pos_self_compassion,
all_items$neg_self_compassion,
all_items$ptgi_total_score,
all_items$iesr_ts
)
) |> round(2)
[,1] [,2] [,3] [,4]
[1,] 1.00 -0.29 0.17 -0.04
[2,] -0.29 1.00 0.09 0.34
[3,] 0.17 0.09 1.00 0.20
[4,] -0.04 0.34 0.20 1.00
library(semhelpinghands)
ci_boot <- standardizedSolution_boot_ci(fit2)
Error in standardizedSolution_boot_ci(fit2) :
Bootstrapping estimates not found. Was se = 'boot' or 'bootstrap'?
parameterEstimates(fit2, boot.ci.type="bca.simple")
lavaanPlot::lavaanPlot(model = fit2)
fitMeasures(fit2)